﻿using UnityEngine;
using System.Collections;
using MessageSystem;

namespace InputSystem
{
    /// <summary>
    /// windows系统交互监听
    /// </summary>
    public class WindowsInputListener : InputListenerBase
    {
        void Update()
        {
            if (Input.GetMouseButton(0))
            {
                if (!IsPointerOverUIObject())
                {
                    MessageSystemFacade.Inst.SendMessage("Click", new ClickArgs( Input.mousePosition));
          
                }
            }
            else if (Input.GetMouseButton(1))
            {
                DebugUtils.LogRedInfo("1");
            }
            else if (Input.GetMouseButton(2))
            {
                DebugUtils.LogRedInfo("2");
            }
            else if (Input.mouseScrollDelta!=Vector2.zero)
            {
                DebugUtils.LogRedInfo("Input.mouseScrollDelta    "+ Input.mouseScrollDelta);
            }
            else if (Input.GetKeyDown(KeyCode.A))
            {

                DebugUtils.LogRedInfo("3");
            }
        }
    }
}
